package com.copa.gamestore.module.gameGoods.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.copa.gamestore.common.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author copa
 * @createDate 2022-09-26 18:10
 * @function
 */
@TableName(value = "game_goods", autoResultMap = true)
@Accessors(chain = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class GameGoods extends BaseEntity {

    private String name;

    private BigDecimal price;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> tag;

    private String developCompany;

    private String mainPicUrl;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> picUrl;

    private String content;

    private Integer num;

    private Boolean isEnabled;

    @TableLogic
    private Boolean isDeleted;

    @Version
    private Integer version;
}
